2 Returns true if point a is inside convex polygon p.
3 Note that if point a lies on the border of p it
6 We assume p is convex! The result is useless if p
9 bool insideConvexPolygon(const vector
<point
> &p
, const point
&a
){
12 for (int i
=0; i
<n
; ++i
){
14 double z
= turn(p
[i
], p
[j
], a
);
19 }else if (z
== 0.0) return false;
20 if (mask
== 3) return false;